package org.shiki.hrm.feign;

import feign.hystrix.FallbackFactory;
import org.shiki.hrm.util.AjaxResult;

public class UserInfoFallbackFactory implements FallbackFactory<UserInfoFeignClient> {
	@Override
	public UserInfoFeignClient create(Throwable throwable) {
		return new UserInfoFeignClient() {
			@Override
			public AjaxResult getTenantInfoById(Long id) {
				return AjaxResult.me().setSuccess(false).setMessage("网络异常!");
			}
		};
	}
}
